package com.chen.subject.infra.basic.es;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 读取es配置文件的配置
 * @author: ChenFY
 * @date: 2024/6/26
 */
@Component
@ConfigurationProperties(prefix = "es.cluster")

public class EsConfigProperties {
    private List<EsClusterConfig> esConfigs = new ArrayList<>();

    /**
     * 获取es集群信息
     * @return
     */
    public List<EsClusterConfig> getEsConfigs(){
        return esConfigs;
    }
    public void setEsConfigs(List<EsClusterConfig> esConfigs) {
        this.esConfigs = esConfigs;
    }
}
